/**  
* @Title: CustomerServiceController.java  
* @Description: TODO(用一句话描述该文件做什么)  
* @author 张鑫
* @phone 17561783855  
* @date 2019年5月20日  
*/
package com.fortune.rainshinesystem.controller;

import com.fortune.rainshinecommon.base.MsgModel;
import com.fortune.rainshinecommon.base.ParmsModel;
import com.fortune.rainshinecommon.model.system.CustomerPayCardModel;
import com.fortune.rainshinesystem.service.CustomerPayCardService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**  
* @ClassName: CustomerServiceController  
* @Description: TODO(顾客会员卡消费)  
* @author 张鑫
* @phone 17561783855
* @date 2019年5月20日  
*    
*/
@RestController
@RequestMapping("/payCard")
public class CustomerPayCardController {
	@Autowired
    private CustomerPayCardService service;
	
	//添加
	@PostMapping("/add")
    public MsgModel add(@RequestBody CustomerPayCardModel model){
        return service.add(model);
    }
	
	/*
	 * //更新
	 * 
	 * @PostMapping("/update") public MsgModel update(@RequestBody
	 * CustomerPayCardModel model){ return service.update(model); }
	 */
	
	//获取列表
	@PostMapping("/list")
    public MsgModel list(@RequestBody ParmsModel parms){
        return service.list(parms);
    }
	
	    //获取消费记录
		@PostMapping("/record")
	    public List<CustomerPayCardModel> listRecord(@RequestBody String id){
	        return service.listRecord(id);
	    }
	
	
	/*
	 * //删除
	 * 
	 * @PostMapping("/del") public MsgModel delShop(@RequestBody
	 * CustomerPayCardModel model){ return service.del(model); }
	 */
}
